<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>应用详情</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name=”apple-mobile-web-app-status-bar-style” content=”default”/>
    <meta name=”apple-mobile-web-app-status-bar-style” content=”black”/>
    <meta name=”apple-mobile-web-app-status-bar-style” content=”black-translucent”/>
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css"/>
    <link href="${s.base}/pc/css/swiper.min.css" rel="stylesheet">
    <link href="${s.base}/pc/css/weWeb.css" rel="stylesheet"/>
</head>
<style type="text/css">
    body, html {
        background: #f5f5f5;
    }
</style>
<body>
<#if showGuide == true>
<div class="tc"></div>
</#if>
<div style="background:#fff;">
    <div class="w1200 we-head clearfix">
        <div class="we-head-logo"><img src="/sysFile/showFileByPath?path=${websiteConfiguration.logoPath}"></div>
        <div class="we-head-nav">
            <ul>
                <li onclick="goFistPage()">首页</li>
                <li onclick="goCaseListPage()">案例</li>
                <li class="checked" onclick="goProductListPage()">应用中心</li>
                <li onclick="goAboutUsPage()">关于我们</li>
                <#if sysUser?? >
                <li onclick="goMyIndexPage()">控制中心</li>
                </#if>
            </ul>
        </div>
        <#if sysUser?? >
        <div class="we-head-logined">
            <div class="user-updown ellipsis"><i class="cytfonts">&#xe6a2;</i></div>
            <div class="user-name ellipsis">${sysUser.name}</div>
            <div class="user-Avatar"><img src="/sysFile/showFileByObjectId?objectId=${sysUser.headLogo}"></div>
            <div class="user-txt-list" style="display:none;">
                <ul>
                    <li>个人中心</li>
                    <li>退出</li>
                </ul>
            </div>
        </div>
        <#else>
        <div class="we-head-loginbtn">
            <span><a href="/login">登录</a></span>
        </div>
    </#if>
    </div>
</div>
<div class="content-15 mart15">
    <div class="thrbar">
        <ul>
            <li><h1>功能选购</h1>
                <h2>多功能模块自由组合</h2></li>
            <li><h1>入驻微信应用</h1>
                <h2>无需账号无需制作</h2></li>
            <li><h1>私人定制</h1>
                <h2>定制专属的应用功能</h2></li>
        </ul>
    </div>
</div>
<div class="content-15 mart15" style="padding:0 15px;">
    <div class="product-detail-ctn">
        <div class="product-detail-pic">
            <img src="/sysFile/showFileByObjectId?objectId=${wxApplyUse.coverImage}">
        </div>
        <div class="product-name">
            <span>${wxApplyUse.name}</span><span class="bb">当前版本：${wxApplyUse.version}</span>
        </div>
        <div class="product-detail-view"><i class="cytfonts">&#xe646;</i><span>访问量：${wxApplyUse.clicks}</span></div>
        <div class="product-detail-view"><i class="cytfonts">&#xe652;</i><span>免费试用期限：${wxApplyUse.useDay}天</span></div>
        <div class="product-detail-syhy">适用行业：
            <#list wxApplyUseCategoryList as category>
            <span>${category.categoryName}</span>
            </#list>
        </div>
        <div class="product-detail-sybtn guidelines" id="applyCommit">
            立即使用
            <#if showGuide == true>
            <!--步骤一开始-->
            <div class="guid-ctn clearfix" onClick="event.cancelBubble = true">
                <div class="guid-point">
                    <div class="guid-point-nei">点击此处，创建你的第一个微信应用。
                        <div class="div-button-line">
                            <button type="button" class="tgbtn">确定</button>
                        </div>
                    </div>
                </div>
                <div class="guid-point-tep"><img src="${s.base}/pc/images/tep3.png"></div>
            </div>
            <!--步骤一结束-->
            </#if>
        </div>
    </div>
    <div class="product-detail-btn clearfix">
        <ul>
            <li class="checked">功能详情</li>
            <li>版本升级</li>
        </ul>
    </div>
    <div class="product-detail-tab" id="tab1">${wxApplyUse.description}</div>
    <div class="product-detail-tab" style=" display: none;" id="tab2">${wxApplyUse.updateRecord}</div>
</div>
</body>
<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/pc/js/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="${s.base}/pc/js/swiper.min.js" type="text/x-javascript"></script>
<script src="${s.base}/pc/js/base.js" type="text/x-javascript"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['jquery', 'dialog', 'baseutil'], function () {
        var $ = layui.jquery,
            dialog = layui.dialog,
            baseutil = layui.baseutil;

        $('.user-txt-list li').bind('click', function () {
            if ($(this).index() === 0) {
                window.open('/web/personalEdit', '_self')
            } else if ($(this).index() === 1) {
                dialog.confirm("确定要退出吗？", function () {
                    baseutil.AjaxGetMark("/webExit", "", function () {
                        window.location.href = "/web/index";
                    });
                });
            }
        });

        $("#applyCommit").bind("click", function () {
            var data = {
                name: '${wxApplyUse.name}',
                coverImage: '${wxApplyUse.coverImage}',
                applyUseId: '${wxApplyUse.id}',
                useDay: '${wxApplyUse.useDay}',
                status: '1'
            };
            baseutil.post("/wx/wxapply/addOrUpdate", data, function (result) {
                if (result.code === 0) {
                    window.location.href = '/web/myIndex';
                } else if (result.code === 1) {
                    dialog.confirm(result.msg, function () {
                        window.location.href = '/login';
                    });
                }else if (result.code === 100) {
                    dialog.confirm(result.msg, function () {
                        window.location.href = '/web/productDetail?id=${wxApplyUse.id}';
                    });
                }
            });
        });

        //跳过
        $(".tgbtn").bind("click",function(){
            baseutil.AjaxPostMark("/sys/sysguide/addOrUpdate", {status: '2'}, function () {
                $(".tc").hide();
                $(".guidelines").removeClass("guidelines");
                $(".guid-ctn").remove();
                e.stopPropagation();
            });
        });
    });

    $(function () {
        $(".we-head-nav ul li").bind("click", function () {
            $(".we-head-nav ul li").removeClass("checked");
            $(this).addClass("checked");
        });
        $(".select-kind span").bind("click", function () {
            $(this).parent(".select-kind").find("span").removeClass("checked");
            $(this).addClass("checked");
        });
        $(".product-list ul li").hover(function () {
            $(".product-list ul li").find(".pro-hover").hide();
            $(this).find(".pro-hover").show();
            $(".product-list ul li").removeClass("checked");
            $(this).addClass("checked");
        }, function () {
            $(this).removeClass("checked");
            $(this).find(".pro-hover").hide();
        });
        $(".product-detail-btn ul li").bind("click", function () {
            $(".product-detail-btn ul li").removeClass("checked");
            $(this).addClass("checked");
            var index = $(this).index();
            if (index == 0) {
                $("#tab1").show();
                $("#tab2").hide();
            } else {
                $("#tab2").show();
                $("#tab1").hide();
            }
        });

        $(".we-head-logined").mouseover(function(){
            $(".user-txt-list").show();
            $(this).find(".user-updown").addClass("Rotate180")
        });

        $(".we-head-logined").mouseout(function(){
            $(".user-txt-list").hide();
            $(this).find(".user-updown").removeClass("Rotate180")
        });
    })
</script>
</html>